define(["require", "exports", "./convert"], function (require, exports, convert_1) {
    "use strict";
    Object.defineProperty(exports, "__esModule", { value: true });
    function createWorkspaceEditFromFileCodeEdits(client, edits, vscode) {
        const workspaceEdit = new vscode.WorkspaceEdit();
        for (const edit of edits) {
            for (const textChange of edit.textChanges) {
                workspaceEdit.replace(client.asUrl(edit.fileName), convert_1.tsTextSpanToVsRange(textChange, vscode), textChange.newText);
            }
        }
        return workspaceEdit;
    }
    exports.createWorkspaceEditFromFileCodeEdits = createWorkspaceEditFromFileCodeEdits;
});
